package com.yl.applicationsecurity.service.Impl;

import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yl.applicationsecurity.mapper.RadarVulnerabilityMapper;
import com.yl.applicationsecurity.mapper.ScriptStateMapper;
import com.yl.applicationsecurity.pojo.RadarVulnerability;
import com.yl.applicationsecurity.pojo.ScriptState;
import com.yl.applicationsecurity.service.RadarVulnerabilityService;
import com.yl.applicationsecurity.service.ScriptStateService;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @author 鹤仙问鹿仙
 * @program: Application-security
 * @description:
 * @date 2025-02-20 16:21:21
 */
@Service
public class ScriptStateServiceImpl  extends ServiceImpl<ScriptStateMapper, ScriptState> implements ScriptStateService {


    @Override
    public Integer updateDate(String name) {
        LambdaUpdateWrapper<ScriptState> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
        lambdaUpdateWrapper.set(ScriptState::getLastDate,new Date()).in(ScriptState::getName , name);
        return baseMapper.update(null,lambdaUpdateWrapper);
    }
}

